package structure.proxy;

/**
 * @author dali
 * @date 2021-07-20 20:44
 * @Description
 */

public class UserProxy implements IUserDao {
    private IUserDao userDao;

    public UserProxy(IUserDao userDao) {
        this.userDao = userDao;
    }

    @Override
    public void save() {
        System.out.println("开始事务");
        userDao.save();
        System.out.println("关闭事务");
    }
}
